<?php

use Illuminate\Http\Request;


/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

// 公司表
Route::prefix('company')->namespace('Company')->group(function () {
    //公司信息 陈雪萍 2.25
    Route::any('companyShow', ['uses' => 'CompanyController@companyShow']);
    //企业资料
    Route::any('companyAdd', ['uses' => 'CompanyController@companyAdd']);
    //企业资料编辑
    Route::any('companyUpd', ['uses' => 'CompanyController@companyUpd']);

});

// 职位 陈雪萍 2.25
Route::prefix('job')->namespace('Job')->group(function(){
    //职位添加接口陈雪萍 2.24
    Route::any('JobAdd', ['uses' => 'JobinforController@JobAdd']);
    //职位查询接口 陈雪萍 2.25
    Route::any('findJob', ['uses' => 'JobinforController@findJob']);
    //职位删除接口 陈雪萍 2.25
    Route::any('delJob', ['uses' => 'JobinforController@delJob']);
    //职位状态修改接口 陈雪萍 2.24
    Route::any('statusShut', ['uses' => 'JobinforController@statusShut']);
    //职位重命名
    Route::any('updName', ['uses' => 'JobinforController@updName']);
    //职位置顶
    Route::any('roofPlace', ['uses' => 'JobinforController@roofPlace']);
});

Route::prefix('index')->namespace('Admin\Invite')->group(function(){
    //校外招聘展示
    Route::any('index/List', ['uses' => 'IndexController@List']);
    //校外招聘搜索
    Route::any('index/Search', ['uses' => 'IndexController@Search']);
    //职位列表
    Route::any('index/positionList', ['uses' => 'IndexController@positionList']);
    //职位详情查询
    Route::any('index/positionInfo', ['uses' => 'IndexController@positionInfo']);
});
//行业接口
Route::prefix('industry')->namespace('Industry')->group(function () {
    //行业展示接口，展示所有行业的名称和id 陈雪萍 2.23
    Route::any('showIndustry', ['uses' => 'IndustryController@showIndustry']);

});

//用户注册接口
Route::prefix('register')->namespace('Register')->group(function () {
    Route::any('register/getCode', ['uses' => 'RegisterController@getCode']);
    Route::any('register/isHave',['uses' => 'RegisterController@isHave']);
    Route::any('register/isYes',['uses' => 'RegisterController@isYes']);
    //用户登录
    Route::any('register/loginUser',['uses' => 'RegisterController@loginUser']);
    //忘记密码
    Route::any('register/forgetPwd',['uses' => 'RegisterController@forgetPwd']);
});

//注册接口
Route::post('register', 'Auth\RegisterController@register');
//登录接口
Route::post('login', 'Auth\LoginController@login');
Route::post('logout', 'Auth\LoginController@logout');
//需要认证的接口
Route::group(['middleware' => 'auth:api'], function() {

});
Route::prefix('admin')->namespace('Admin')->group(function () {
    Route::any('user/add', ['uses' => 'UserController@add']);
    Route::any('user/update',['uses' => 'UserController@update']);
});

//朱留根
Route::namespace('usere')->group(function () {
    //修改密码
    Route::post('user/modify-pwd', 'UsereEditController@modifyPwd');
});
//朱留根
Route::namespace('goods')->group(function () {
    //查询可兑换的商品
    Route::post('goods/goods-show', 'GoodsController@goodsShow');
    //查询要兑换的商品
    Route::get('goods/goods-find', 'GoodsController@goodsFind');
});
//朱留根
Route::namespace('integral')->group(function () {
    //查询兑换日志
    Route::post('integral/log-show', 'IntegralController@logShow');
});
//朱留根
Route::namespace('Evaluation')->group(function () {
    //我的测评
    Route::any('evaluation/my', 'EvaluationController@my');
//查看测评结果
    Route::any('evaluation/see-evaluation-res', 'EvaluationController@seeEvaluationRes');
});
//朱留根
Route::namespace('Exchange')->group(function () {
    //兑换商品接口
    Route::post('exchange/exchange', 'ExchangeController@exchange');
//查询兑换商品日志
    Route::get('exchange/exchange-log', 'ExchangeController@exchangeLog');
});
//航运列表
Route::get('shipping/get', 'Shipping\ShippingController@get');
//资讯列表
Route::get('information/get', 'Information\InformationController@get');
//用户主页----李迪
Route::prefix('homepage')->namespace('Homepage')->group(function () {
    Route::any('new/add', 'NewController@add');
    //获取轮播图接口
    Route::any('new/getList', ['uses' => 'NewController@getList']);
    //获取所有企业接口
    Route::any('new/getCompany', ['uses' => 'NewController@getCompany']);
    //获取热门企业接口
    Route::any('new/getHotCompany', ['uses' => 'NewController@getHotCompany']);

    //最近的五条搜索历史   2月25
    Route::any('search/getHistory', ['uses' => 'SearchController@getHistory']);
    //搜索次数最多的五条记录  2月25
    Route::any('search/maxInfo', ['uses' => 'SearchController@maxInfo']);

    //活动列表 
    Route::any('activity/getAll', ['uses' => 'ActivityController@getAll']);
    //活动详情
    Route::any('activity/find', ['uses' => 'ActivityController@find']);
    //活动报名
    Route::any('activity/sign-up', ['uses' => 'ActivityController@singUp']);
});


// 简历
Route::prefix('resume')->namespace('Resume')->group(function () {
    Route::any('aaa', ['uses' => 'ResumeController@aaa']);

    // 简历列表
    Route::any('look-resume', ['uses' => 'ResumeController@lookResume']);
    // 进入新建简历页面
    Route::any('add-resume', ['uses' => 'ResumeController@addResume']);
    // 添加简历数据
    Route::post('add',['uses' => 'ResumeController@add']);
    // 查询行业
    Route::get('industry',['uses' => 'ResumeController@industry']);
    // 尽心用户基本信息的修改
    Route::post('update',['uses' => 'ResumeController@update']);


    //简历中心 陈雪萍 2.25
    Route::any('resumeList', ['uses' => 'ResumeController@resumeList']);
    //简历搜索 陈雪萍 2.26
    Route::any('poSearch', ['uses' => 'ResumeController@poSearch']);
    // 进入新建简历页面  添加简历数据 状态为不可用
    Route::get('add-resume', ['uses' => 'ResumeController@addResume']);
    // 修改简历基本信息  并修改状态可用
    Route::post('updainfor',['uses' => 'ResumeController@updainfor']);
    // 修改求职意向
    Route::post('updafind',['uses' => 'ResumeController@updafind']);
    // 修改进行实习/工作经历
    Route::post('updawork',['uses' => 'ResumeController@updawork']);
});

// 简历投递记录
Route::prefix('record')->namespace('Record')->group(function () {
    // 简历列表
    Route::any('lists', ['uses' => 'RecordController@lists']);
    // 简历详情
    Route::any('resume', ['uses' => 'RecordController@resume']);


});

//  我的收藏
Route::prefix('collection')->namespace('Collection')->group(function () {
    // 进入我的收藏页面  展示收藏的公司
    Route::any('company', ['uses' => 'CollectionController@company']);
    // 查看公司详情
    Route::any('companys', ['uses' => 'CollectionController@companys']);
    // 我的收藏的职位
    Route::any('position', ['uses' => 'CollectionController@position']);
    // 我的收藏的咨询
    Route::any('information', ['uses' => 'CollectionController@information']);
    Route::any('aaa', ['uses' => 'CollectionController@aaa']);
    Route::any('bbb', ['uses' => 'CollectionController@bbb']);
});


// 孙权
// 航运空间以及航运测评
Route::prefix('space')->namespace('Space')->group(function () {
//  航运空间
    // 轮播图
    Route::any('image', ['uses' => 'SpaceController@image']);
    // 航运空间评论
    Route::any('comment', ['uses' => 'SpaceController@comment']);
    // 发布动态
    Route::post('addfb', ['uses' => 'SpaceController@addfb']);

//  航运测评
    // 测试题列表
    Route::any('testlist', ['uses' => 'SpaceController@testlist']);
    // 查询出测试题目
    Route::any('testlists', ['uses' => 'SpaceController@testlists']);
    // 测试题搜索
    Route::any('testsou', ['uses' => 'SpaceController@testsou']);

});
//七牛云接口
Route::any('qiniu', 'BaseApiController@uploadFile');
